package com.qk.entity;

import jakarta.validation.constraints.Max;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


/**
 * 商机跟进记录实体类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BusinessTrackRecord {

    /**
     * 跟进记录id, 主键
     */
    private Integer id;

    /**
     * 商机id，关联商机id
     */
    @NotNull(message = "商机id不能为空")
    private Integer businessId;

    /**
     * 跟进人id，关联用户id
     */
    @NotNull(message = "跟进人id不能为空")
    private Integer userId;

    /**
     * 跟进状态, 1:接通, 2:拒绝, 3:无人接听
     */
    @NotNull(message = "跟进状态不能为空")
    @Min(value = 1, message = "跟进状态值必须大于0")
    @Max(value = 3, message = "跟进状态值不能大于3")
    private Integer trackStatus;

    /**
     * 沟通重点
     */
    private String keyItems;

    /**
     * 下次跟进时间
     */
    private LocalDateTime nextTime;

    /**
     * 沟通纪要
     */
    private String record;

    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    private LocalDateTime createTime;
}
